// 日志操作

#include <iostream>
#include <string>
#include <ctime>

#ifndef __LOG_DEFINE_
#define __LOG_DEFINE_

#define DEBUG   0
#define NOTICE  1
#define WARNING 2
#define ERROR   3   

std::string msg[] = {
    "Debug",
    "Notice",
    "Waring",
    "Error"
};

std::ostream& log(const std::string& message, int level)
{
    std::cout << (unsigned int)time(NULL) << " | " << msg[level] << " | " << message << std::endl;
}

#endif